home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: presby.edu!jtbell
- From: jtbell@presby.edu (Jon Bell)
- Subject: Re: What are the differences between structures and classes in C++ ?
- Message-ID: <DpHxrw.8u9@presby.edu>
- Date: Sun, 7 Apr 1996 14:33:32 GMT
- References: <4k5m65$av@hpscit.sc.hp.com> <DpG53J.Hsz@presby.edu> <4k83j3$a56@hpscit.sc.hp.com> <marnoldDpHvED.E0t@netcom.com>
- Organization: Presbyterian College, Clinton, South Carolina USA
-
- Matt Arnold <marnold@netcom.com> wrote:
- >Structs can inherit from other structs and classes and can be inherited
- >by other structs and classes. Structs can have virtual functions, member
- >operators, constructors and destructors, you can create template structs,
- >and so on.
- >
- >In other words, structs *are* classes.
-
- Just now I took a sample program which uses inheritance and simply
- changed all the classes to structs, making sure that public/private was
- always specified explicitly.
-
- The "structified" program compiled and ran exactly like the original.
-
- --
- Jon Bell <jtbell@presby.edu> Presbyterian College
- Dept. of Physics and Computer Science Clinton, South Carolina USA
-